package com.ala4.oxcafe.repository;

import com.ala4.oxcafe.entity.DeptInfo;
import com.ala4.oxcafe.repository.mapper.DeptInfoMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;

/**
 * 部门信息
 *
 * @author PING
 * @date 2025-03-25
 */
@Repository
public class DeptInfoRepository extends ServiceImpl<DeptInfoMapper, DeptInfo> implements IService<DeptInfo> {

    public void deleteChildNode(Long deptId) {
        this.remove(Wrappers.<DeptInfo>lambdaQuery().likeRight(DeptInfo::getId, deptId));
    }
}
